<script>
    var persons = [
        {
            username: '张飞',
            sex: '男',
            salary: 50000
        },
        {
            username: '关羽',
            sex: '男',
            salary: 60000
        },
        {
            username: '刘备',
            sex: '男',
            salary: 30000
        }
    ]


    // 解构数据

    // 拿出关羽的工资
    // let sal=persons[1].salary
    // console.log(sal);//60000


    // let [,{
    //     // salary:sal
    //     salary
    // }]=persons

    let [,{ salary,sex }]=persons

    console.log(salary);


</script>